home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 4093 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1006 b 

  1. Path: newshost.cin.gov.au!usenet
  2. From: rossw@cin.gov.au (Ross Wilson)
  3. Newsgroups: crl.general,comp.sys.sun.misc,comp.unix.sys5.misc,comp.lang.c,sci.math
  4. Subject: Re: Problem with C for the mathematical programm
  5. Date: Thu, 01 Feb 1996 23:41:56 GMT
  6. Organization: Community Information Network
  7. Message-ID: <4erfj5$f5c@canb.cin.gov.au>
  8. References: <4epq2e$h4b@crl2.crl.com>
  9. NNTP-Posting-Host: chico.cin.gov.au
  10. X-Newsreader: Forte Free Agent 1.0.82
  11.  
  12. sorkin@crl.com (Iouri Sorkine) wrote:
  13.  
  14.  
  15. >I execute "cc name.c" and receive "ld: Undefined symbol
  16. >                                       _cos
  17. >                                       _sin
  18. >and so on...                                ". 
  19. >What's wrong?        
  20.  
  21. You will need to include the math library.  How you do this depends on
  22. what operating system and/or compiler you are using.
  23.  
  24. If you use UNIX, do:
  25.  
  26.     cc -lm name.c
  27.  
  28. If you use Borland, Microsoft, whatever, you will have to read the
  29. manual.
  30.  
  31. Don't forget to #include <math.h>.
  32.  
  33. Hope this helps,
  34.  
  35. Ross
  36.  
  37.  
  38.  
  39.